<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="template-head.jsp" />
<jsp:include page="template-body.jsp" />
<div class="hero-unit" id="importentitypage">
<div class="container">
<div class="span12">
	<h3>Import Node class data (Entity data)</h3>
	<c:choose>
		<c:when test="${importentitybody == 'init'}">
		<form id="createsurveyform" method="post" action="importentity.do">
			<p>Enter the name of new Node Class (Entity Class)</p>
			<input type="text" name="className"><br/><br/>
			<p>Select the type of new Node Class (Entity Class)</p>
			<select class="type" name="type">
				<option>Agent</option>
				<option>Organization</option>
				<option>Knowledge</option>
				<option>Resource</option>
				<option>Belief</option>
				<option>Event</option>
				<option>Task</option>
				<option>Location</option>
				<option>Role</option>
				<option>Action</option>
			</select><br/><br/>
			<input type="submit" name="button" class="btn btn-primary" value="Next"><br/><br/>
			<input type="submit" name="button" class="btn btn-primary" value="Back"><br/><br/>
		</form>
		</c:when>
		<c:when test="${importentitybody == 'import'}">
		<form id="importentityform" method="post" action="importentity.do" enctype="multipart/form-data">
			<input type="file" name="file" size="50"><br/>
			<input type="submit" name="button" class="btn btn-primary" value="Import"><br/><br/>
		</form>
		</c:when>
		<c:when test="${importentitybody == 'complete' || importentitybody == 'view'}">
		<form id="importentitycomplete" method="post" action="importentity.do">
			<c:if test="${importentitybody == 'complete'}">
				<p>Upload complete. Following is the ID and name of entities imported.</p>
			</c:if>
			<table>
			<c:forEach var="entity" items="${importentitydata}">
				<tr>
					<td>${entity.id}</td>
					<td>${entity.name}</td>
				</tr>
			</c:forEach>
			</table>
			<input type="submit" name="button" class="btn btn-primary" value="Ok"><br/><br/>
		</form>
		</c:when>
	</c:choose>
</div>
</div>
<!--Create another space for contents' extension  -->
</div>
<jsp:include page="template-foot.jsp" /> 